package com.itcoon.cloud.framework.ex.errorcode;


import com.itcoon.cloud.framework.ex.exception.BaseException;

public interface IExceptionCode<EX extends BaseException> extends IErrorCode{

    default EX newException(){
        return bindException();
    }

    default EX newException(Throwable cause){
        EX ex =  bindException();
        ex.initCause(cause);
        return ex;
    }

    EX bindException();
}
